﻿using PLM.ConfigurationCenter.Core.Util;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PLM.ConfigurationCenter.SqlSugar {

    public class DbManager {
        /// <summary>
        /// 
        /// </summary>
        public static ISqlSugarClient DbContext {
            get {
                var client = new SqlSugarClient(new ConnectionConfig() {
                    DbType = DbType.Sqlite,
                    InitKeyType = InitKeyType.Attribute,
                    IsAutoCloseConnection = true,
                    ConnectionString = CommonHandler.ConnectionString
                });
                return client;
            }
        }
    }
}
